{{set . "title" "无花果－用户登录"}}

<html>
  <head>
    <title>{{.title}}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" media="screen" href="/public/css/login.css">
    {{range .moreStyles}}
      <link rel="stylesheet" type="text/css" href="/public/{{.}}">
    {{end}}
    <script src="/public/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/public/js/sessvars.js" type="text/javascript" charset="utf-8"></script>
    {{range .moreScripts}}
<!--       <script src="/public/{{.}}" type="text/javascript" charset="utf-8"></script> -->
    {{end}}
  </head>
  <body>

    <div id="header">
      <h1>欢迎登陆无花果平台官网</h1>
      {{if .user}}
        <div id="options">
          Connected as {{.user.Username}}
          |
          <a href="{{url "Application.Logout"}}">Search</a>
          |
          <a href="{{url "Application.Logout"}}">Settings</a>
          |
          <a href="{{url "Application.Logout"}}">Logout</a>
        </div>
      {{end}}
    </div>

    <div id="content">
      {{if .flash.error}}
        <p class="fError">
          <strong>{{.flash.error}}</strong>
        </p>
      {{end}}
      {{if .flash.success}}
        <p class="fSuccess">
          <strong>{{.flash.success}}</strong>
        </p>
      {{end}}


<div id="login">

  <form action="{{url "Application.Login"}}" id="formLogin" method="POST">
    <p class="field">
      <label>用户名:</label>
      <input type="text" name="username" size="19" value="{{.flash.username}}" />
    </p>
    <p class="field">
      <label>密码:</label>
      <input type="password" name="password" size="19"/>
    </p>
    <p class="field">
      <label>记住密码:</label>
      <input type="checkbox" name="remember" value="true"/>
    </p>
    <p class="buttons">
      <input type="submit" value="登陆" />
    </p>
  </form>

  <p>
    <a href="{{url "Application.Register"}}">注册新用户</a>
  </p>

</div>


{{template "footer.html" .}}